package com.ethink.order.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.order.api.info.TocSaleReturnImportLogDetailInfo;
import com.ethink.order.api.model.TocSaleReturnImportModel;
import com.ethink.order.api.request.TocSaleReturnImportLogAddRequest;
import com.ethink.order.api.request.TocSaleReturnImportLogQueryRequest;
import com.ethink.order.api.request.UpdateStatusBaseRequest;
import com.ethink.order.api.response.TocSaleReturnImportLogDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * TOC销售退单导入日志 Facade接口
 *
 * @author default
 * @date 2022-12-16
 */
@FeignClient(name = "ethink-order-service", path = "order-service/facade/v1/tocSaleReturnImportLog", contextId = "tocSaleReturnImportLogFacade")
public interface TocSaleReturnImportLogFacade {

    @PostMapping("/addTocSaleReturnImportLog")
    @ResponseBody
    Integer add(@RequestBody TocSaleReturnImportLogAddRequest request);

    @PostMapping("/pageQuery")
    @ResponseBody
    Page<TocSaleReturnImportModel> pageQuery(@RequestBody TocSaleReturnImportLogQueryRequest request);

    @GetMapping("delete")
    @ResponseBody
    Integer delete(@RequestParam("id") Long id);

    @GetMapping("queryDetail")
    @ResponseBody
    TocSaleReturnImportLogDetailResponse queryDetail(@RequestParam("id") Long id);

    @PostMapping("queryDetail")
    @ResponseBody
    Integer updateStatus(@RequestBody UpdateStatusBaseRequest request);

    @PostMapping("queryDetailByShopOrderNoList")
    @ResponseBody
    List<TocSaleReturnImportLogDetailInfo> queryDetailByShopOrderNoList(@RequestBody List<String> shopOrderNoList);
}